<template>
	<view class="wf-box">
		<view class="head" :style="{ paddingTop: navBarHeight }">
			<view class="head-np">
				<view class="back" @click="back()">
					<image src="../../static/img/chat-09.png"></image>
				</view>
				<view class="title">提现详情</view>
				<view></view>
			</view>
		</view>
		<view class="main" :style="{ paddingTop: navBarHeight }">
			<image src="@/static/img/con_3.png" mode="widthFix"></image>
			<view class="money">{{info.actualAmount}}U</view>
			<view class="hint">{{info.status==0?'待审核':info.status==1?'提现成功':info.status==2?'提现驳回':'提现撤销' }}</view>

			<view class="info">
				<view class="item">
					<view>创建时间</view>
					<view>{{info.created}}</view>
				</view>
				<view class="item">
					<view>提现到</view>
					<view class="long">{{info.address}}</view>
					<!-- <image src="@/static/img/copy-icon.png" @click="copy(info.address)" mode="widthFix"></image> -->
				</view>
				<view class="item bor_n">
					<view>处理进度</view>
					<view></view>
				</view>
				<uni-steps :options="options" :active="active" direction="column"></uni-steps>

				<view class="item" v-if="info.status==2">
					<view>进度说明</view>
					<view>{{info.describe}}</view>
				</view>
				<view class="item">
					<view>订单号</view>
					<view class="long">{{info.withdrawNo}}</view>
					<!-- <image src="@/static/img/copy-icon.png" @click="copy(info.withdrawNo)" mode="widthFix"></image> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import navBarMixin from '@/mixin/navBarMixin.js'
	export default {
		data() {
			return {
				info: '',
				active: 0,
				options:[{title: '提交处理',desc:'2018-11-13'}, {title: '处理结果',desc:''}]
			}
		},
		mixins: [navBarMixin],
		onLoad(option) {
			this.info = JSON.parse(option.info)
			console.log(this.info);
			this.options[0].desc = this.info.created
			this.options[1].desc = this.info.completed
			if(this.info.status==1)this.options[1].title = '处理成功'
			else if(this.info.status==2)this.options[1].title = '提现驳回'
			else if(this.info.status==3)this.options[1].title = '提现撤销'
			if(this.info.status!=0) this.active = 1
		},
		methods: {
			back() {
				uni.navigateBack()
			},
			copy(e) {
				uni.setClipboardData({
					data: e,
					success: function() {
						uni.showToast({
							title: '复制成功',
							icon: 'none'
						})
					}
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.wf-box {
		overflow: hidden;

		.back {
			image {
				width: 20rpx;
				height: 37rpx;
			}
		}

		.head {
			position: fixed;
			z-index: 333;
			width: 100%;
			background: #fff;

			.head-np {
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 100%;
				height: 96rpx;
				padding: 0 30rpx;
				box-sizing: border-box;

				.title {
					font-size: 36rpx;
					font-weight: bold;
				}
			}
		}

		.main {
			margin-top: 126rpx;
			// margin-top: 246rpx;
			// margin: 246rpx 30rpx 60rpx;
			padding: 0 30rpx;
			text-align: center;

			>image {
				width: 84rpx;
				margin: 50rpx auto 20rpx;
			}

			.money {
				font-weight: 500;
				font-size: 34rpx;
				line-height: 42rpx;
			}

			.hint {
				font-size: 26rpx;
				color: #3F93FF;
				line-height: 42rpx;
				margin: 20rpx auto 46rpx;
			}

			.info {
				background-color: white;
				border-radius: 10rpx;
				padding: 20rpx 30rpx 100rpx;

				.item {
					height: 80rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					// border-bottom: 1rpx solid #EEEEEE;
					view {
						font-size: 30rpx;
						&:nth-of-type(1) {
							font-size: 28rpx;
						}
						&:nth-of-type(2) {
							width: 400rpx;
							margin-left: 100rpx;
							font-size: 26rpx;
							color: #999999;
							margin-left: auto;
							text-align: left;
						}
					}
					image {
						width: 40rpx;
						margin-left: 10rpx;
					}
				}
			}
		}
	}
	.long {
		// width: 300rpx !important;
		white-space: nowrap; /* 确保文本在一行内显示 */
		overflow: hidden; /* 超出容器的文本隐藏 */
		text-overflow: ellipsis; /* 超出部分显示省略号 */
	}
	.bor_n {
		border: none !important;
	}
	.uni-steps {
		margin-left: 200rpx;
	}
	::v-deep .uni-steps__column-text {
		border: none !important;
	}
</style>